<?php  echo $_SERVER['SCRIPT_NAME']."<BR>"; ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../include/main.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%"  border="0" cellspacing="6" cellpadding="6">
  <tr>
    <td><div align="right" class="txt24bb_white">isset(), empty(), and unset() </div></td>
  </tr>
</table>
<br>
<br>
<table width="500" border="0" align="center" cellpadding="1" cellspacing="1" class="tbl_border">
  <tr>
    <td><table width="100%"  border="0" cellpadding="0" cellspacing="0" class="tbl_gray_wborder">
        <tr>
          <td class="txt14b_black">            <p><span class="txt14_red">note that a FALSE value doesn't display a value!!</span><span class="txt16b_blue"><br>
              <br>
              Let's set a few variables:</span><br>
              (see source code, setting $foo, $foo2, $int, $bool) <br>
              <?php
				$foo =" ";
				$foo2 = "I am also set!";
				$int = 22;
				$bool = TRUE;
				$hello=0;
			  ?>
              <br>
              <span class="txt16b_blue">Are they set? isset()</span><br>
          <?php
				if (isset($foo)) echo "\$foo is set!!<BR>";
				echo "The value of isset(\$foo) is:", isset($foo), "<BR>";
				echo "The value of isset(\$foo2) is:",isset($foo2), "<BR>";;
				echo "The value of isset(\$int) is:",isset($int), "<BR>";;
				echo "The value of isset(\$bool) is:",isset($bool), "<BR><BR>";
				echo "The value of isset(\$bool2) is:",isset($bool2), "<BR>";
			?>
          <br> 
          <span class="txt16b_blue">Are any variables empty?</span><br>
          <?php 
		  		echo "The value of empty(\$foo) is:", empty($foo), "<BR>";
				echo "The value of empty(\$hello) is:", empty($hello), "<BR>";
		  ?>
          <br>
          <span class="txt16b_blue">Let's unset variables:</span><br>
          (see source code, unsetting $foo, $int, $bool)          <br>
          <?php				
                unset($foo);
				unset($int);
				unset($bool); ?>
          <br>
          <span class="txt16b_blue">Now, are they set or empty? </span><br>
          <?php
		  		if (isset($foo)) echo "\$foo is set!!<BR>";
				echo "The value of isset(\$foo) is:", isset($foo), "<BR>";
				echo "The value of isset(\$foo2) is:",isset($foo2), "<BR>";;
				echo "The value of isset(\$int) is:",isset($int), "<BR>";;
				echo "The value of isset(\$bool) is:",isset($bool), "<BR><BR>";
			    echo "The value of empty(\$foo) is:", empty($foo), "<BR>";
			    echo "The value of empty(\$foo2) is:", empty($foo2), "<BR>";
		 ?>
</p>          </td>
        </tr>
    </table></td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>